﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Arsenal2
{
	class Arsen2Client : NWClient
	{
		public Arsen2Client(string host, int port)
			: base(host, port)
		{
		}

		protected override bool _ProcessMessage()
		{
			if (MsgBuf.Length != 4)
				throw new Exception("Invalid response");
			int N = FetchInt32();
			switch (N)
			{
				case 0:
					Console.WriteLine("ERROR");
					break;
				case 1:
					Console.WriteLine("OK");
					break;
				default:
					Console.WriteLine("????");
					break;
			}
			return true;
		}
	}
}